<?php echo $this->render('header.phtml'); ?>
<h2><?php echo $this->escape($this->content_title);?></h2>
<a class="ask bt_red" style="float:left;" href="javascript:document.forms[0].submit();"><span class="bt_red_lft"></span><strong>Delete selected</strong><span class="bt_red_r"></span></a>
<a class="bt_green" href="javascript:document.forms[1].submit();"><span class="bt_green_lft"></span><strong>Add to group</strong><span class="bt_green_r"></span></a>
<br><br><br><br>

<table border="0" width="100%"><tr valign="top"><td>
<form action="/userstudygroup/delete" method="post">
<input type="hidden" name="group" value="<?php echo $this->group->id;?>">
<table summary="Linked" id="rounded-corner" width="400" style="width:400px !important;">
    <thead>
        <tr>
            <th class="rounded-company" scope="col"></th>
            <th class="rounded" scope="col">Name</th>
            <th class="rounded" scope="col">Email & Phone</th>
            <th class="rounded-q4" scope="col">Start</th>
        </tr>
    </thead>
    <!--<tfoot>
        <tr>
            <td class="rounded-foot-left" colspan="6"><em>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.</em></td>
            <td class="rounded-foot-right">&nbsp;</td>

        </tr>
    </tfoot>-->
    <tbody>
<?php foreach($this->linked as $obj) : ?>
        <tr valign="top">
            <td><input type="checkbox" name="linked[]" value="<?php echo $obj['id'];?>"></td>
            <td><?php echo $this->escape($obj['first_name'].' '.$obj['last_name']);?></td>
            <td><?php echo $this->escape($obj['email'].' '.$obj['phone']);?></td>
            <td><?php echo $this->escape($obj['created_at']);?></td>
        </tr>
<?php endforeach; ?>
    </tbody>
</table>
</form>
</td>
<td>
<form action="/userstudygroup/index" method="post">
<input type="hidden" name="group" value="<?php echo $this->group->id;?>">
<table summary="Users" id="rounded-corner" width="400" style="width:400px !important;">
    <thead>
        <tr>
            <th class="rounded-company" scope="col"></th>
            <th class="rounded" scope="col">Name</th>
            <th class="rounded-q4" scope="col">Email & Phone</th>
        </tr>
    </thead>
    <!--<tfoot>
        <tr>
            <td class="rounded-foot-left" colspan="6"><em>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.</em></td>
            <td class="rounded-foot-right">&nbsp;</td>

        </tr>
    </tfoot>-->
    <tbody>
<?php foreach($this->users as $obj) : ?>
        <tr>
            <td><input type="checkbox" name="users[]" value="<?php echo $obj->id;?>"></td>
            <td><?php echo $this->escape($obj->first_name.' '.$obj->last_name);?></td>
            <td><?php echo $this->escape($obj->email.' '.$obj->phone);?></td>
        </tr>
<?php endforeach; ?>
    </tbody>
</table>
</form>
</td>
</tr></table>
</form>
<?php echo $this->render('footer.phtml'); ?>